package com.gwnet.shop.controller.api;

import cn.dev33.satoken.annotation.SaCheckPermission;
import com.gwnet.common.log.annotation.Log;
import com.gwnet.common.log.enums.BusinessType;
import com.gwnet.common.mybatis.core.page.TableDataInfo;
import com.gwnet.shop.controller.MBaseController;
import com.gwnet.shop.domain.ShopNotice;
import com.gwnet.shop.service.IShopNoticeService;
import com.gwnet.shop.utils.AjaxResult;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * 通知(公告)Controller
 * 
 * @author 张万鹏
 * @date 2024-07-29
 */
@RestController
@RequestMapping("/api/notice")
public class ShopNoticeApiController extends MBaseController
{
    @Resource
    private IShopNoticeService shopNoticeService;

    /**
     * 查询通知(公告)列表
     */
    @SaCheckPermission("shop:notice:list")
    @GetMapping("/list")
    public TableDataInfo list(ShopNotice shopNotice)
    {
        shopNotice.setIsShow("0");
        startPage();
        List<ShopNotice> list = shopNoticeService.selectShopNoticeList(shopNotice);
        return getDataTable(list);
    }

}
